package com.tfswx.jkgl.designer.enums;

import lombok.Getter;

/**
 * @author ricky
 * @date 2022/8/8
 */
public enum ZdlxEnum {
    CHAR("01", "字符串"),
    VARCHAR("01", "字符串"),
    VARCHAR2("01", "字符串"),
    DATETIME("02", "日期"),
    TIMESTAMP("02", "日期"),
    INT("04", "数字"),
    INTEGER("04", "数字"),
    ;

    @Getter
    private String code;
    private String dedsc;

    ZdlxEnum(String code, String dedsc) {
        this.code = code;
        this.dedsc = dedsc;
    }

    public static ZdlxEnum valueOfName(String name) {
        for (ZdlxEnum value : values()) {
            if (value.name().equalsIgnoreCase(name)) {
                return value;
            }
        }
        return ZdlxEnum.VARCHAR;
    }
}
